Skip to content

Add selection tolerance#3659

Closed
Nuhiat-Arefin wants to merge 1 commit intoGraphiteEditor:masterfrom
Nuhiat-Arefin:Add-Selection-Tolerance
Closed

Add selection tolerance#3659
Nuhiat-Arefin wants to merge 1 commit intoGraphiteEditor:masterfrom
Nuhiat-Arefin:Add-Selection-Tolerance

Conversation

@Nuhiat-Arefin
Copy link

@Nuhiat-Arefin Nuhiat-Arefin commented Jan 20, 2026

Fixes #2141
Modified the intersect_point function in click_target.rs. If the stroke (as measured in viewport space) is very thin(less than 5px) it calculates inflated_stroke such that the stroke as measured in viewport space is 5px. Otherwise, it keeps the value of the original stroke.
Before:

Screen.Recording.2026-01-24.at.2.06.55.PM.mov

After:

Screen.Recording.2026-01-24.at.2.10.26.PM.1.mov

With larger inflation:

Screen.Recording.2026-01-24.at.3.01.53.PM.mov

@Nuhiat-Arefin Nuhiat-Arefin force-pushed the Add-Selection-Tolerance branch 2 times, most recently from c71ef03 to 9f5acea Compare January 24, 2026 06:51
@Keavon Keavon force-pushed the Add-Selection-Tolerance branch from 9f5acea to e8c4a04 Compare February 14, 2026 05:56
@Keavon
Copy link
Member

Keavon commented Feb 14, 2026

Sorry it took so long to reach this in my PR review queue! Upon taking a closer look, this doesn't solve the problem, and I believe your reproduction steps (shown in your videos) show a misunderstanding of the problem, since each of those are shapes with a (white) fill area which doesn't even apply to this situation. This implementation breaks the relationship between hover targets (when the shape that will be clicked lights up) and click targets (when clicking actually selects the shape). I also took a closer look at the original issue report and I am not sure if it actually needs to be changed from its current form. Anyway, thank you for your attempt and hopefully you learned something in the process.

@Keavon Keavon closed this Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Small click target when dragging/moving a straight line or small objects

2 participants